package top.suven.base.http.enums;

/**
 * @ClassName:
 * @Description:
 * @Author dengzhifu
 * @Date 2018/6/6 18:57
 */
public enum OrderBizEnumType {

    /** 设备购买 */
    BUY("0", "设备购买"),
    /** 设备充值 */
    RECHARGE("1", "设备充值"),
    /** 钱包充值 */
    WALLET_RECHARGE("2", "钱包充值"),
    /** 升级云手机 */
    UP_GRADE_PAD("3", "升级云手机");

    String value;
    String name;
    public String getValue() {
        return value;
    }
    public String getName() {
        return name;
    }
    OrderBizEnumType(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public static OrderBizEnumType getByValue(String value) {
        for(OrderBizEnumType orderBizEnumType : OrderBizEnumType.values()) {
            if(orderBizEnumType.value.equals(value)) {
                return orderBizEnumType;
            }
        }
        throw new IllegalArgumentException("No element matches " + value);
    }


}
